package com.jy.project.enums;

public enum ApplyTypeEnum {
    QUALITY(10, "新增物资质量类型"),
    COLLECT(20, "领用单"),
    STOCK_RETURN(30, "退库单"),
    BORROW(40, "借出单"),
    RENEW(50, "续借单"),
    RETURN( 60, "归还单"),
    INSERT_MATERIAL( 70, "新增物资单"),
    HANDOVERL( 80, "交接单"),
    ;
    private Integer code;


    private String value;

    ApplyTypeEnum(Integer code, String value) {
        this.code = code;
        this.value = value;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getValue() {
        return value;
    }

    public void setValue(String value) {
        this.value = value;
    }


    public static  String getValue(Integer code){
        for (ApplyTypeEnum value : values()) {
            if (value.getCode().equals(code)){
                return  value.getValue();
            }
        }
        return null;
    }
}
